//
//  GuestManageModel.m
//  QRMaster
//
//  Created by myApple on 15/4/14.
//  Copyright (c) 2015年 myApple. All rights reserved.
//

#import "GuestModel.h"

#import "GTMNSString+HTML.h"

@implementation GuestModel

-(void)setEmail:(NSString *)email
{
    if ([email isEqual:[NSNull null]]) {
        _email = @"";
    }
    else
    {
        _email = [email gtm_stringByUnescapingFromHTML];
    }
}

-(void)setTelePhone:(NSString *)telePhone
{
    _telePhone = telePhone;
    if ([_telePhone isEqual:[NSNull null]]) {
        _telePhone = @"";
    }
}

-(void)setGuestName:(NSString *)guestName
{
    if ([guestName isEqual:[NSNull null]]) {
        _guestName = @"";
    }
    else
    {
        _guestName = [guestName gtm_stringByUnescapingFromHTML];
    }
    
}

-(void)setHeadUrl:(NSString *)headUrl
{
    if ([headUrl isEqual:[NSNull null]]) {
        _headUrl = @"";
    }
    else
    {
        _headUrl = [headUrl gtm_stringByUnescapingFromHTML];
    }
}


-(void)setSex:(NSString *)sex
{
    if ([sex isEqual:[NSNull null]]) {
        _sex = @"";
    }
    else
    {
        _sex = [sex gtm_stringByUnescapingFromHTML];
    }
}

-(void)setCertificaties:(NSString *)certificaties
{
    if ([certificaties isEqual:[NSNull null]]) {
        _certificaties = @"";
    }
    else
    {
        _certificaties = [certificaties gtm_stringByUnescapingFromHTML];
    }
}

-(void)setFirstChar:(NSString *)firstChar
{
    if ([firstChar isEqual:[NSNull null]] || [@"0" isEqualToString:firstChar]) {
        _firstChar = @"#";
    }
    else if([firstChar isKindOfClass:[NSNumber class]])
    {
        _firstChar = @"#";
    }
    else
    {
        _firstChar = [firstChar gtm_stringByUnescapingFromHTML];
    }
}



@end
